package com.hmall.search.context;

/**
 * 存入ThreadLocal数据
 */
public class BaseContext {

    public static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static ThreadLocal<String> threadLocal2 = new ThreadLocal<>();

    public static void setCurrentId(String id) {
        threadLocal.set(id);
    }

    public static String getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

    public static void setAuthorization(String authorization) {
        threadLocal2.set(authorization);
    }

    public static String getAuthorization() {
        return threadLocal2.get();
    }

    public static void removeAuthorization() {
        threadLocal2.remove();
    }

}
